<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
  <title>文档列表 - 光年(Light Year Admin)后台管理系统模板</title>
  <link rel="icon" href="favicon.ico" type="image/ico">
  <meta name="keywords" content="LightYear,光年,后台模板,后台管理系统,光年HTML模板">
  <meta name="description" content="LightYear是一个基于Bootstrap v3.3.7的后台管理系统的HTML模板。">
  <meta name="author" content="yinqi">
  <link th:href="@{/assters/css/bootstrap.min.css}" href="css/bootstrap.min.css" rel="stylesheet">
  <link th:href="@{/assters/css/materialdesignicons.min.css}" href="css/materialdesignicons.min.css" rel="stylesheet">
  <link th:href="@{/assters/css/style.min.css}" href="css/style.min.css" rel="stylesheet">
</head>

<body>
<div class="lyear-layout-web">
  <div class="lyear-layout-container">
    <!--左侧导航-->
    <div th:replace="common/common :: left"></div>
    <div th:replace="common/common :: head"></div>

    <!--页面主要内容-->
    <main class="lyear-layout-content">

      <div class="container-fluid">

        <div class="row">
          <div class="col-lg-12">
            <div class="card">
              <div class="card-toolbar clearfix">
                <form class="pull-right search-bar" method="get" action="#!" role="form">
                  <div class="input-group">
                    <div class="input-group-btn">
                      <input type="hidden" name="search_field" id="search-field" value="title">
                      <button class="btn btn-default dropdown-toggle" id="search-btn" data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">
                        标题 <span class="caret"></span>
                      </button>
                      <ul class="dropdown-menu">
                        <li> <a tabindex="-1" href="javascript:void(0)" data-field="title">标题</a> </li>
                        <li> <a tabindex="-1" href="javascript:void(0)" data-field="cat_name">栏目</a> </li>
                      </ul>
                    </div>
                    <input type="text" class="form-control" value="" name="keyword" placeholder="请输入名称">
                  </div>
                </form>
                <div class="toolbar-btn-action">
                  <a class="btn btn-primary m-r-5" href="#!" th:href="@{/galgameAdd.html}"><i class="mdi mdi-plus"></i> 新增</a>
                  <a class="btn btn-success m-r-5" href="#!"><i class="mdi mdi-check"></i> 启用</a>
                  <a class="btn btn-warning m-r-5" href="#!"><i class="mdi mdi-block-helper"></i> 禁用</a>
                  <a class="btn btn-danger" href="#!"><i class="mdi mdi-window-close"></i> 删除</a>
                </div>
              </div>
              <div class="card-body">

                <div class="table-responsive">
                  <table class="table table-bordered">
                    <thead>
                    <tr>
                      <th>
                        <label class="lyear-checkbox checkbox-primary">
                          <input type="checkbox" id="check-all"><span></span>
                        </label>
                      </th>
                      <th>编号</th>
                      <th>作品名</th>
                      <th>价格</th>
                      <!--<th>性别</th>-->
                      <!--<th>年龄</th>-->
                      <th>开发商</th>

                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="galgame:${galgames.list}">
                      <td>
                        <label class="lyear-checkbox checkbox-primary">
                          <input type="checkbox" name="ids[]" value="1"><span></span>
                        </label>
                      </td>
                      <td th:text="${galgame.galid}">1</td>
                      <td th:text="${galgame.galname}">第01章 天涯思君不可忘</td>
                      <td th:text="${galgame.galprice}">《集数》</td>
                      <td th:text="${galgame.galdevelopers}">开发商</td>
                      <td>
                        <div class="btn-group">
                          <a class="btn btn-xs btn-default" th:href="@{/toGalGamePage/}+${galgame.mid}"  href="#!" title="编辑" data-toggle="tooltip"><i class="mdi mdi-pencil"></i></a>
                          <a class="btn btn-xs btn-default" th:href="@{/delGalGame/}+${galgame.mid}" href="#!" title="删除" data-toggle="tooltip"><i class="mdi mdi-window-close"></i></a>
                        </div>
                      </td>
                    </tr>
                    </tbody>
                  </table>
                </div>
                <ul class="pagination">
                  <li><a href="#1" th:href="@{/galgames(page=1,size=5)}">首页</a></li>
                  <li><a href="#1" th:href="@{/galgames(page=${galgames.pageNum -1},size=5)}">上一页</a></li>
                  <li th:each="pageNums :${#numbers.sequence(galgames.firstPage,galgames.lastPage)}">
                    <a href="#1" th:href="@{/galgames(page=${galgames},size=5)}" th:text="${pageNums}"></a>
                  </li>
                  <li><a href="#1" th:href="@{/galgames(page=${galgames.pageNum +1},size=5)}">下一页</a></li>
                  <li><a href="#1" th:href="@{/galgames(page=${galgames.pages},size=5)}">尾页</a></li>

                </ul>

              </div>
            </div>
          </div>

        </div>

      </div>

    </main>
    <!--End 页面主要内容-->
  </div>
</div>

<script type="text/javascript" th:src="@{/assters/js/jquery.min.js}" src="js/jquery.min.js"></script>
<script type="text/javascript" th:src="@{/assters/js/bootstrap.min.js}" src="js/bootstrap.min.js"></script>
<script type="text/javascript" th:src="@{/assters/js/perfect-scrollbar.min.js}" src="js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" th:src="@{/assters/js/main.min.js}" src="js/main.min.js"></script>
<script type="text/javascript">
  $(function(){
    $('.search-bar .dropdown-menu a').click(function() {
      var field = $(this).data('field') || '';
      $('#search-field').val(field);
      $('#search-btn').html($(this).text() + ' <span class="caret"></span>');
    });
  });
</script>
</body>
</html>

